package java730;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;

public class Sort {

	public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new FileReader("sort.txt"));
		BufferedWriter br1=new BufferedWriter(new FileWriter("sort1.txt"));
		HashMap<String, String> map=new HashMap<String,String>();
		String read;
		while((read=br.readLine())!=null){
			String[] line=read.split("\\.");
			map.put(line[0], line[1]);
		}
		for(String key:map.keySet()){
			String value=map.get(key);
			br1.write(value+"\n");
		}
		br.close();
		br1.close();
	}
	
}
